package model.metrics
{
	import model.Field;
	
	import visualization.IDataPoint;
	
	public class Total extends Metric
	{
		public function Total()
		{
			super();
		}
		
		private var _total:Number = 0;
		override public function startMetric(arr:Array):void{
			this._total = 0;
		}
		
		override public function iterate(item:IDataPoint):void{
			this._total += item.getData(this.field) as Number;
		}
		
		override public function finishMetric(arr:Array):Object{
			return this._total;
		}
		
	}
}